<%-------------------------------------------------------------------
 * 页面名称：esBatchPayTransSummary.jsp
 * 功能描述：批量支付交易摘要
 * Action: 
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ipb" uri="/WEB-INF/conf/tld/ipb.tld"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%
    String path = request.getContextPath();
    boolean netReturn= request.getSession().getAttribute("netReturnResponse") == null;
    
%>
<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/newstyle.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/common.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src='<%=path%>/js/vnv/commonForManage.js'></script>
<script language="javascript">
function pay(btnObj){
    if(checkNecessaryInput(document.forms[0])){
        btnObj.disabled = true;
        document.forms[0].action = "<%=path%>/page/transaction/esBatchPayTransToPay.do";
        document.forms[0].submit();
    }
}
var globalBatchNo;
function peerAccountView(batchNo){
    globalBatchNo = batchNo;
    agiledata.getUserInternal(peerAccountPopup);
}
function peerAccountPopup(data){
    if(data) {
        openLayer("<%=path%>/page/transaction/viewEsBatchTransPeerAccount.do?batchNo="+globalBatchNo);
    } else {
        location.href="<%=path%>/page/util/session_invalid.jsp";
    }
}
function doBack(){
	document.forms[0].subAccountID.value='';
	document.forms[0].actionTypeID.value='';
	document.forms[0].submit();
	
}
</script>
<html:form action="toWaitPay" method="post">
  <html:hidden property="transStatus" />
  <html:hidden property="batchType" />
  <html:hidden property="batchNo"/>
  <html:hidden property="transId"/>
  <input type="hidden" name="subAccountID" value="<bean:write name="totalSummary" property="debit.id" />">
  <input type="hidden" name="actionTypeID" value="<bean:write name="totalSummary" property="actionType.id" />">
  <html:hidden property="amountMin"/>
  <html:hidden property="amountMax"/>
  <html:hidden property="strBeginDate"/>
  <input type="hidden" name="toPay" value="<bean:write name="toPay" />">
  <input type="hidden" name="viewBatchNo" value="<bean:write name="totalSummary" property="batchNo" />">
<div id="main">
  <div class="content_right">
    <div class="titleinfo">批量支付交易摘要</div>
    <div class="edit_pass">
      <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" class="blueborder">
          <tr>
            <td width="50%" align="right" height="25">批次号：</td>
            <td width="50%" class="fontgraydrop14" height="25"><bean:write name="totalSummary" property="batchNo" /></td>
          </tr>
          <tr>
            <td align="right" height="25">付款方账户：</td>
            <td class="fontgraydrop14" height="25">
            <logic:empty name="totalSummary" property="debit.account.name">
	        <logic:empty name="totalSummary" property="debit.account.email">
	          <bean:write name="totalSummary" property="debit.account.mobile" />
	        </logic:empty>
	        <logic:notEmpty name="totalSummary" property="debit.account.email">
	          <bean:write name="totalSummary" property="debit.account.email" />
	        </logic:notEmpty>
	        </logic:empty>
	        <logic:notEmpty name="totalSummary" property="debit.account.name">
	          <bean:write   name="totalSummary" property="debit.account.name" />
	        </logic:notEmpty>
	            的
	        <bean:write name="totalSummary" property="debit.accountName" />
            </td>
          </tr>
          <tr>
            <td align="right" height="25">收款方账户：</td>
            <td class="fontgraydrop14" height="25">
            <logic:equal name="totalSummary" property="actionType.id" value="16">卡账户</logic:equal>
            <logic:notEqual name="totalSummary" property="actionType.id" value="16">
            <a href="#" onclick="peerAccountView('<bean:write name="totalSummary" property="batchNo" />')" class="dropblue14b">点击查看</a>
            </logic:notEqual>
            </td>
          </tr>
          <tr>
            <td align="right" height="25">交易类型：</td>
            <td class="fontgraydrop14"><bean:write name="totalSummary" property="actionType.actionName" /></td>
          </tr>
          <tr>
            <td align="right" height="25">交易取消笔数：</td>
            <td class="fontgraydrop14" height="25">
            <logic:present name="cancelSummary"><bean:write name="cancelSummary" property="statusCount" /></logic:present>
        	<logic:notPresent name="cancelSummary">0</logic:notPresent>
            </td>
          </tr>
          <tr>
            <td align="right" height="25">审核失败笔数：</td>
            <td class="fontgraydrop14" height="25">
            <logic:present name="unauditSummary"><bean:write name="unauditSummary" property="statusCount" /></logic:present>
        	<logic:notPresent name="unauditSummary">0</logic:notPresent>
            </td>
          </tr>
          <tr>
            <td align="right" height="25">待支付笔数：</td>
            <td class="fontgraydrop14" height="25">
            <logic:present name="unpaySummary"><bean:write name="unpaySummary" property="statusCount" /></logic:present>
        	<logic:notPresent name="unpaySummary">0</logic:notPresent>
            </td>
          </tr>
          <tr>
            <td align="right" height="25">总笔数：</td>
            <td class="fontgraydrop14" height="25"><bean:write name="totalSummary" property="totalCount" /></td>
          </tr>
          <tr>
            <td align="right" height="25">总金额：</td>
            <td class="fontgraydrop14" height="25"><span id="debitSubAccountBalanceSpan" class="orangefont14b">
            <ad:FormatPrase>
          	<bean:write name="totalSummary" property="totalAmountWithFee" />
        	</ad:FormatPrase></span> 元
            </td>
          </tr>
          <tr>
            <td align="right" height="25">交易开始日期：</td>
            <td class="fontgraydrop14"><bean:write name="totalSummary" property="beginDate" format="yyyy-MM-dd HH:mm"/><span class="font_gray"></span></td>
          </tr>
          <tr>
            <td align="right" height="25">需要支付金额：</td>
            <td class="fontgraydrop14"><span id="debitSubAccountBalanceSpan" class="orangefont14b">
            <ad:FormatPrase>
	          <logic:present name="unpaySummary"><bean:write name="unpaySummary" property="statusAmountWithFee" /></logic:present>
	          <logic:notPresent name="unpaySummary">0.00</logic:notPresent>
	        </ad:FormatPrase></span> 元
            </td>
          </tr>
          <logic:equal name="toPay" value="true">
          <tr>
            <td align="right" height="25">支付密码：</td>
            <td class="fontgraydrop14">
            <input class="inputStyle" size="20" type="password" name="password" alt="支付密码" />
        	<font color="red"><html:errors/></font>
        	<logic:present name="carderror">
        	<font color="red"><bean:write name="carderror"/></font>
        	</logic:present>
            </td>
          </tr>
          </logic:equal>
          <tr>
            <td colspan="2" align="right">&nbsp;</td>
          </tr>
      </table>
      <table width="100%" height="55" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">
              <logic:equal name="toPay" value="true">
	          <input type="button" value="支付" class="button_style" onclick="pay(this)" />
	          </logic:equal>
	          <input type="submit" value="返 回" class="button_style" onclick="doBack()"/>
              </td>
        </tr>
      </table>
    </div>
  </div>
</div>
</div>
</html:form>
<script type="text/javascript" src="<%=path%>/js/layer.js"></script>